<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>任务详情</title>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="css/comm.css" />
    <link rel="stylesheet" type="text/css" href="css/header.css" />
    <link rel="stylesheet" type="text/css" href="../script/vant/index.css" />
    <link rel="stylesheet" type="text/css" href="css/home_task_con.css" />
    <style>
        .work-div{
            text-align: center;
            display: inline-block;
        }
        .work-img{
            width: 80px;
            height: 80px;
            border-radius: 10px;
        }
        .person{
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 0.6rem;
        border-radius: 5px;
        text-align: center;
        color: #fff;
        background:#289fff;
        margin-left: 2px;
    }
    .aui-list .aui-list-item{
        background-size: 100% 0px;
    }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <section class="aui-content contentBox">
            <div class="aui_list boxarea mb20">
                <div class="work_title">
                   任务信息
                </div>
                <div class="pb10">
                    <div >
                        <div class="content-title">{{form.Title}}</div>
                    </div>
                        <div class="mb10 ">
                            <label class="label-text-width ccc">任务类型</label>
                            <label class="fr">{{form.TypeName}} </label>
                        </div>
                        <!-- <div class="mb10">
                            <label class="label-text-width ccc">任务周期</label>
                            <label class="fr"><span v-text="onDealTime(form.StartTime)"></span>~ <span v-text="onDealTime(form.EndTime)"></span></label>
                        </div> -->
                        <div class="mb10" style="display: flex;">
                            <div class="label-text-width ccc">任务周期</div>
                            <div style="text-align: right;" ><span v-text="onDealTime(form.StartTime)"></span>~ <span v-text="onDealTime(form.EndTime)"></span></div>
                        </div>
                        <div class="mb10">
                            <label class="label-text-width ccc">创建时间</label>
                            <label class="fr"><span v-text="onDealTime(form.AddTime)"></span></label>
                        </div>
                        <div class="mb10">
                            <label class="label-text-width ccc">创建人</label>
                            <label class="fr">{{form.AddUserName}}</label>
                        </div>
                        <div class="mb10">
                            <label class="label-text-width ccc">负责人</label>
                            <label class="fr">{{form.HandleUserName}}</label>
                        </div>
                        <div class="mb10">
                            <label class="label-text-width ccc">协同人员</label>
                        </div>
                        <div class="mb10">
                            <div v-if="form.TeamworkUserList" class="work-div aui-margin-r-10" v-for="item in form.TeamworkUserList">
                                <div v-if="!item.HeadImg" class="person"> <span class="aui-font-size-18">{{item.UserName.slice(-2)}}</span></div>
                                <div v-if="item.HeadImg"><img class="work-img" :src="item.HeadImg" style="width: 50px; height: 50px;" /></div>
                                <div class="text-grey aui-margin-t-5">{{item.UserName}}</div>
                            </div>
                        </div>
                        <div class="mb10">
                            <label class="label-text-width ccc">参与人员</label>
                        </div>
                        <div class="mb10">
                            <div v-if="form.PartakeUserList" class="work-div aui-margin-r-10" v-for="item in form.PartakeUserList">
                                <div v-if="!item.HeadImg" class="person"> <span class="aui-font-size-18">{{item.UserName.slice(-2)}}</span></div>
                                <div v-if="item.HeadImg"><img class="work-img" :src="item.HeadImg" style="width: 50px; height: 50px;" /></div>
                                <div class="text-grey aui-margin-t-5">{{item.UserName}}</div>
                            </div>
                        </div>
                        <div class="mb10">
                            <label class="label-text-width ccc">任务标签</label>
                        </div>
                        <div class="mb10">
                            <label v-if="form.TagList" class="typestatus dsl aui-margin-r-5" style="float: none;" v-for="item in form.TagList">{{item.TagName}}</label> 
                        </div>
                        <div class="mb10">
                            <label class="label-text-width ccc">任务详情</label>
                        </div>
                    <div v-if="form.NoteDesc!=''" class="font-color">
                        {{form.NoteDesc}}
                    </div>
                    <div v-if="form.FileList" class="aui-content ">
                        <div class="handle_img_list">
                            <div class="task_con_image">
                                <img class="aui-img-object" v-for="itemImg in form.FileList" v-on:click="img_browser(itemImg.SysFinalFilePath)" v-bind:src="itemImg.SysFinalFilePath" />
                                <div class="cl"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!--工作记录-->
            <div class="aui_list boxarea mb20">
                <div class="work_title">工作记录 <span v-if="form.AddRecord||form.IsTeamwork" class="text-blue fr" v-on:click="doOpenRecordAdd()" ><i  class="icon iconfont icon-addApp text-blue aui-font-size-14"></i> 添加记录</span></div>
                <div v-if="form.RecordList.length<=0" class="hide-nodata mb20">
                    <label>暂无记录</label>
                </div>
                <div v-if="form.RecordList" class="ptb10 aui-padded-r-0">
                    <ul class="processul">
                        <li class="processulli  li-border-color-grey" v-for="(item,index) in form.RecordList">
                            <div class="task_process_con">
                                <div class="handle">
                                    <div class="task_process_basic_title">
                                        <div class="task_process_basic_title_name fl">
                                            <div class="fl">{{item.Title}}</div>
                                            <div class="cl"></div>
                                        </div>

                                        <div class="task_process_basic_title_time ccc fr">
                                            <span v-if="item.List==undefined">{{item.HandleTime}}</span>
                                            <span v-if="item.List!=undefined">{{item.List[item.List.length-1].HandleTime}}</span>
                                        </div>
                                        <div class="cl"></div>
                                    </div>
                                    <div v-if="item.List==undefined" class="">
                                        <div class="handle_con_msg ">
                                            {{item.NoteDesc}}
                                        </div>
                                    </div>
                                    <div v-if="item.List!=undefined" class="">
                                        <div class="handle_con_msg " style="display: flex;justify-content: space-between;">
                                            <!-- <div style="width: 80%;">{{item.NoteDesc}}</div> -->
                                            <div style="width: 80%;">
                                                <div v-for="itemc in item.List">{{itemc.NoteDesc}}</div>
                                            </div>
                                            <div >
                                                <i v-if="item.IsEdit" v-on:click="doOpenRecord(item.List)" class="aui-iconfont aui-icon-edit aui-margin-r-5"></i>
                                                <i v-if="item.IsDelete" v-on:click="doDelRecord(item.List)" class="aui-iconfont aui-icon-trash"></i>
                                            </div>
                                        </div>
                                        <div class="contentbg">
                                            <div>{{item.List[item.List.length-1].ContentDesc}}</div>
                                            <div class="handle_img_list" v-if="item.List[item.List.length-1].FileList&&item.List[item.List.length-1].FileList.length>0">
                                                <div class="task_con_image">
                                                    <img v-for="item2 in item.List[item.List.length-1].FileList" v-on:click="img_browser(item2.SysFinalFilePath)" v-bind:src="item2.SysFinalFilePath" />
                                                    <div class="cl"></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="hide_height"></div>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>


            <div v-if="form.IsComplete" class="bottom">
                <div class="aui_bottombtn" v-on:click="do_complete()">完成任务</div>
            </div>
            <div v-if="form.IsRestart" class="bottom">
                <div class="aui_bottombtn" v-on:click="do_restart()">重启任务</div>
            </div>
            <div v-if="form.IsSend" class="bottom">
                <div class="aui_bottombtn" v-on:click="do_release()">发布任务</div>
            </div>

            <div v-if="IsOpetionMore" class="aui-popup aui-popup-top-right aui-popup-in" style="box-shadow: -4px 4px 6px 1px rgba(0, 0, 0, 0.04);min-width: 5.2rem;">
                <div class="aui-popup-arrow"></div>
                <div class="aui-popup-content" >
                    <div v-if="!form.IsChange&&!form.IsEdit&&!form.IsDelete" class="hide-nodata" style="line-height: 4.5rem;" >
                        暂无权限
                    </div>
                    <ul v-else class="aui-list aui-list-noborder" >
                        <li v-if="form.IsChange" v-on:click="dochangeuser()" class="aui-list-item aui-list-item-middle"><div class="aui-list-item-inner" style="justify-content: center;">变更人员</div></li>
                        <li v-if="form.IsEdit" v-on:click="doworktaskedit()" class="aui-list-item aui-list-item-middle"><div class="aui-list-item-inner" style="justify-content: center;">编辑</div></li>
                        <li v-if="form.IsDelete" v-on:click="doworktaskdel()" class="aui-list-item aui-list-item-middle"><div class="aui-list-item-inner" style="justify-content: center;">删除</div></li>
                    </ul>
                </div>
            </div>
        </section>
    </div>
</body>
<script type="text/javascript " src="../script/api.js"></script>
<script type="text/javascript " src="../script/vue.js"></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript" src="../script/aui-slide.js"></script>
<script type="text/javascript" src="../script/aui-popup.js"></script>
<script type="text/javascript " src="../script/vant/vue.js"></script>
<script type="text/javascript " src="../script/vant/vant.js"></script>
<script type="text/javascript " src="../script/moment/moment.js"></script>
<script type="text/javascript " src="js/worktaskdetail.js"></script>

</html>
